﻿#ifndef MEASURE_TRAPEZOID_H
#define MEASURE_TRAPEZOID_H
#include "halconcpp/HalconCpp.h"
using namespace HalconCpp;

struct M_T
{
    //图像换算比例
    float para1;
    //高度补偿值
    float para2;
    //高度标准值
    float para3;
    //高度下限偏差值
    float para4;
    //高度上限偏差值
    float para5;


    //平行度补偿值
    float para6;
    //平行度标准值
    float para7;
    //平行度偏差值
    float para8;




    //角度1补偿值
    float para9;
    //角度2补偿值
    float para10;

    //角度1标准值
    float para11;
    //角度2标准值
    float para12;

    //角度1下限偏差值
    float para13;
   //角度2下限偏差值
    float para14;


    //角度1上限偏差值
    float para15;
    //角度2上限偏差值
    float para16;


    //定位阈值
    float para17;
    //找边sigma
    float para18;
    //找边阈值
    float para19;
};


class Measure_Trapezoid
{
public:
    Measure_Trapezoid();
    //CCD3  0 高度   1平行度  2 左斜边 角度   3  右斜边角度
    int M_Trapezoid(HObject Img,HTuple &OutPara,HObject &OutImg);
    //梯形高度
    bool Flag1;
    //平行度
    bool Flag2;
    //斜边角度1
    bool Flag3;
    //斜边角度2
    bool Flag4;


    M_T m_part;
};

#endif // MEASURE_TRAPEZOID_H
